package drrr.orm;

import java.util.List;

/**
 * 对外的服务接口
 * Created by Xun on 2015/4/28.
 */
public class RoomService extends Service {
    @Override
    public List<Entity> getAllEntities() {
        return getAllDao().getRoomDao().getAllRooms();
    }

    @Override
    public void insert(Entity entityRef) {
        getAllDao().getRoomDao().insert((RoomEntity) entityRef);
    }

    public void delete(Entity entity) {
        getAllDao().getRoomDao().delete((RoomEntity) entity);
    }

    public void update(Entity entity) {
        getAllDao().getRoomDao().update((RoomEntity) entity);
    }

    /*public void find(int roomid) {
        getAllDao().getRoomDao().find(roomid);
    }*/

    public RoomEntity find(int roomid) {

        return getAllDao().getRoomDao().find(roomid);
    }
}
